Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Add CI/CD workflows #133

Merged
merged 2 commits into from
May 26, 2020
Merged

Conversation

kaituo
Copy link
Member

@kaituo kaituo commented May 21, 2020

Issue #, if available:
#104

Description of changes:

This PR adds CI/CD workflows. CI workflow builds a zip file, installs that on the official ODFE docker image, and runs rest test case. CI workflow is triggered by branch pushing. CD workflow builds zip, rpm, deb files, and uploads those files to s3. CD workflow is triggered by tag creation.

This PR also increases model initialization waiting time as needed on DetectionResultEvalutationIT as it can be long on a remote cluster.

Testing done:

  • ran the scripts on CI/CD workflow manually and tested it works.
  • made sure local gradle build time does not increase due to my change in DetectionResultEvalutationIT.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

This PR adds CI/CD workflows. CI workflow builds a zip file, installs that on the official odfe docker image, and runs rest test case.  CI workflow is triggered via branch pushing.  CD workflow builds zip, rpm, deb files and uploads those files to s3.  CD workflow is triggered via tag creation.

This PR also increases model initialization waiting time as needed on an rest test case as that time can be can be longer on a remote cluster.

Testing done:
1. run the scripts on CI/CD workflow on Mac and tested it works.
2. make sure local gradle build time does not increase.
@kaituo kaituo changed the title Added CI/CD workflows Add CI/CD workflows May 21, 2020
// we wait at most 60 secs
if (duration < 60_000) {
Thread.sleep(2_000);
} else {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if it is timed out, is it better to fail fast?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, changed to throw exception.

@@ -172,7 +172,22 @@ private void startDetector(
} catch (Exception e) {}
}
Thread.sleep(5_000);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this wait can be merged to the wait below now

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merged

- name: Run AD Test
run: |
./gradlew ':integTestRunner' --tests "com.amazon.opendistroforelasticsearch.ad.rest.*IT" -Dtests.rest.cluster=localhost:9200 -Dtests.cluster=localhost:9200 -Dtests.clustername="docker-cluster"
./gradlew :integTestRunner --tests "com.amazon.opendistroforelasticsearch.ad.e2e.*IT" -Dtests.rest.cluster=localhost:9200 -Dtests.cluster=localhost:9200 -Dtests.clustername="docker-cluster"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This won't run if the first one fails. just wanna confirm if this is what we expect

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good point. Merged these 2 lines into one.

@kaituo kaituo merged commit 8804725 into opendistro-for-elasticsearch:master May 26, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants